// 按需引入echarts
import * as echarts from 'echarts/core';
import Vue from "vue";
import {
    GridComponent,
    TooltipComponent,
    TitleComponent
} from 'echarts/components';
import {
    LineChart,
    PieChart
} from 'echarts/charts';
import {
    CanvasRenderer
} from 'echarts/renderers';

echarts.use([
  GridComponent,
  TitleComponent, 
  TooltipComponent,
  LineChart,
  PieChart, 
  CanvasRenderer
]);

Vue.prototype.$echarts = echarts;